<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Space Cloud Demo</title>
</head>

<body>
    <div class="d-flex justify-content-center">
        <div class="col-md-10 col-lg-8 col-xl-6" id="login">
            <h2 class="mt-3 text-center">LOGIN</h2>
            <div class="form-group">
                <label for="username">Username</label>
                <input type="text" class="form-control" id="username" placeholder="Enter username" name="username">
            </div>
            <div class="form-group">
                <label for="password">Password</label>
                <input type="password" class="form-control" id="password" placeholder="Password" name="password">
            </div>
            <button class="btn btn-outline-dark pl-4 pr-4" id="loginButton">Login</button>
            <button class="btn btn-outline-dark pl-4 pr-4" id="showRegister">Go to Register Page</button>
        </div>

        <div class="col-md-10 col-lg-8 col-xl-6" id="register">
            <h2 class="mt-3 text-center">REGISTER</h2>
            <div class="form-group">
                <label for="username">Username</label>
                <input type="text" class="form-control" id="usernameReg" placeholder="Enter username" name="username">
            </div>
            <div class="form-group">
                <label for="password">Password</label>
                <input type="password" class="form-control" id="passwordReg" placeholder="Password" name="password">
            </div>
            <button class="btn btn-outline-dark pl-4 pr-4" id="registerButton">Register</button>
            <button class="btn btn-outline-dark pl-4 pr-4" id="showLogin">Go to Login Page</button>
        </div>

        <div class="col-md-10 col-lg-8 col-xl-6" id="display">
            <h2 class="mt-3 text-center">LIVE DATA</h2>
            <div class="row">
                <div class="col">
                    <h3 class="mt-3">Device 1</h3>
                    <div class="my-3">
                        <span><b>Average: </b></span>
                        <span id="average1">0</span>
                    </div>
                    <div class="my-3">
                        <span><b>Number: </b></span>
                        <span id="length1">0</span>
                    </div>
                    <table id="table1" class="table table-bordered table-text-centered table-no-padding">
                    </table>
                </div>
                <div class="col">
                    <h3 class="mt-3">Device 2</h3>
                    <div class="my-3">
                        <span><b>Average: </b></span>
                        <span id="average2">0</span>
                    </div>
                    <div class="my-3">
                        <span><b>Number: </b></span>
                        <span id="length2">0</span>
                    </div>
                    <table id="table2" class="table table-bordered table-text-centered table-no-padding">
                    </table>
                </div>
            </div>
        </div>
    </div>


    <script src="https://spaceuptech.com/downloads/libraries/space-api-v0.9.2.js"></script>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"></script>
    <script src="demo.js"></script>
    <link rel="stylesheet" href="demo.css">
</body>

</html>